//
//  PartyTextDetailTableViewCell.m
//  OneDay
//
//  Created by lanou3g on 15/10/29.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import "PartyTextDetailTableViewCell.h"

@implementation PartyTextDetailTableViewCell

// 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.desTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, kWidth - 20, 30)];
        self.desTextLabel.numberOfLines = 0;
        self.desTextLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.desTextLabel];
    }
    return self;
}

- (void)setModel:(DescriptionModel *)model
{
    OneDayObject *oneObject = [[OneDayObject alloc] init];
    CGRect newFrame = self.desTextLabel.frame;
    newFrame.size.height = [oneObject sizeWithText:model.content font:16 width:kWidth - 20 height:10000].height;
    self.desTextLabel.frame = newFrame;
    self.desTextLabel.text = model.content;
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
